What I (ChatGPT) changed

The executable uses delay-loaded Windows APIs. Microsoft confirms that a failed delay-loaded GetProcAddress normally raises an exception, which matches your kernel32!RaiseException crash pattern.

I patched the generated wrapper functions for APIs that are unavailable on XP, so that instead of invoking the XP-incompatible delay loader they return an appropriate fallback:

Touch/gesture APIs → FALSE
IsProcessDPIAware → FALSE
LocaleNameToLCID → 0
WIC conversion → E_NOTIMPL
Buffered Paint APIs → safe no-op/failure results
DwmIsCompositionEnabled → FALSE
SHCreateItemFromParsingName → E_NOTIMPL

I deliberately didn't modify APIs such as GetNativeSystemInfo and IsWow64Process, because those are available on the XP generation.

The patch does not change the PE layout, entry point, imports, or image size. I also recalculated the PE checksum.
